package com.lyz.domain.po;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResponseEntity {
    private Integer code;
    private String message;
    private Object data;

    public static ResponseEntity success() {
        return  new ResponseEntity(200, "success", null);
    }

    public static ResponseEntity success(Object data) {
        return  new ResponseEntity(200, "success", data);
    }

    public static ResponseEntity error(String errMsg) {
        return  new ResponseEntity(500, errMsg, null);
    }
}
